import service from '@/utils/request'
// @Tags ProductComment
// @Summary 创建商品/产品评论表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductComment true "创建商品/产品评论表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /productComment/createProductComment [post]
export const createProductComment = (data) => {
  return service({
    url: '/productComment/createProductComment',
    method: 'post',
    data,
  })
}

// @Tags ProductComment
// @Summary 删除商品/产品评论表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductComment true "删除商品/产品评论表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /productComment/deleteProductComment [delete]
export const deleteProductComment = (params) => {
  return service({
    url: '/productComment/deleteProductComment',
    method: 'delete',
    params,
  })
}

// @Tags ProductComment
// @Summary 批量删除商品/产品评论表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除商品/产品评论表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /productComment/deleteProductComment [delete]
export const deleteProductCommentByIds = (params) => {
  return service({
    url: '/productComment/deleteProductCommentByIds',
    method: 'delete',
    params,
  })
}

// @Tags ProductComment
// @Summary 更新商品/产品评论表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.ProductComment true "更新商品/产品评论表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /productComment/updateProductComment [put]
export const updateProductComment = (data) => {
  return service({
    url: '/productComment/updateProductComment',
    method: 'put',
    data,
  })
}

// @Tags ProductComment
// @Summary 用id查询商品/产品评论表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.ProductComment true "用id查询商品/产品评论表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /productComment/findProductComment [get]
export const findProductComment = (params) => {
  return service({
    url: '/productComment/findProductComment',
    method: 'get',
    params,
  })
}

// @Tags ProductComment
// @Summary 分页获取商品/产品评论表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取商品/产品评论表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /productComment/getProductCommentList [get]
export const getProductCommentList = (params) => {
  return service({
    url: '/productComment/getProductCommentList',
    method: 'get',
    params,
  })
}
// @Tags ProductComment
// @Summary 不需要鉴权的商品/产品评论表接口
// @accept application/json
// @Produce application/json
// @Param data query request.ProductCommentSearch true "分页获取商品/产品评论表列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /productComment/getProductCommentPublic [get]
export const getProductCommentPublic = () => {
  return service({
    url: '/productComment/getProductCommentPublic',
    method: 'get',
  })
}
